#!/bin/bash
# 开始下载
URL=https://github.com/cdr/code-server/releases/download/v3.6.1/code-server-3.6.1-linux-amd64.tar.gz
source ../linux/download_unzip.sh "vscode" $URL

# code-server 配置
cat >~/.config/code-server/config.yaml<<EOF
bind-addr: 0.0.0.0:9090
auth: password
password: vscode
cert: false
EOF
# 启动命令
/opt/module/vscode/code-server-3.6.1-linux-amd64/code-server
# 插件下载地址
# https://marketplace.visualstudio.com/vscode

#============== 调用本脚本时可用变量 ==============
#>>> $FILE_PATH 文件绝对路径：/opt/software/code-server-3.6.1-linux-amd64.tar.gz
#>>> $FILE_EXTENSION 文件后缀：gz
#>>> $File_HOME 软件HOME：/opt/module/vscode/code-server-3.6.1-linux-amd64
#>>> $REPO_PATH 仓库目录：/opt/repository/vscode
